package com.cxhc.system.service.app.impl;

import java.util.List;

import com.cxhc.common.annotation.Integral;
import com.cxhc.common.enums.IntegralType;
import com.cxhc.common.utils.DateUtils;
import com.cxhc.system.domain.app.FlowFormFireFirecheck;
import com.cxhc.system.mapper.app.FlowFormFireFirecheckMapper;
import com.cxhc.system.service.app.IFlowFormFireFirecheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 消防队消防检查Service业务层处理
 *
 * @author Dhq
 * @date 2024-09-23
 */
@Service
public class FlowFormFireFirecheckServiceImpl implements IFlowFormFireFirecheckService
{
    @Autowired
    private FlowFormFireFirecheckMapper flowFormFireFirecheckMapper;

    /**
     * 查询消防队消防检查
     *
     * @param id 消防队消防检查主键
     * @return 消防队消防检查
     */
    @Override
    public FlowFormFireFirecheck selectFlowFormFireFirecheckById(Long id)
    {
        return flowFormFireFirecheckMapper.selectFlowFormFireFirecheckById(id);
    }

    /**
     * 查询消防队消防检查列表
     *
     * @param flowFormFireFirecheck 消防队消防检查
     * @return 消防队消防检查
     */
    @Override
    public List<FlowFormFireFirecheck> selectFlowFormFireFirecheckList(FlowFormFireFirecheck flowFormFireFirecheck)
    {
        return flowFormFireFirecheckMapper.selectFlowFormFireFirecheckList(flowFormFireFirecheck);
    }

    /**
     * 新增消防队消防检查
     *
     * @param flowFormFireFirecheck 消防队消防检查
     * @return 结果
     */
    @Override
    @Integral(IntegralType.SECURITY_CHECK)
    public int insertFlowFormFireFirecheck(FlowFormFireFirecheck flowFormFireFirecheck)
    {
        return flowFormFireFirecheckMapper.insertFlowFormFireFirecheck(flowFormFireFirecheck);
    }

    /**
     * 修改消防队消防检查
     *
     * @param flowFormFireFirecheck 消防队消防检查
     * @return 结果
     */
    @Override
    public int updateFlowFormFireFirecheck(FlowFormFireFirecheck flowFormFireFirecheck)
    {
        flowFormFireFirecheck.setUpdateTime(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS));
        return flowFormFireFirecheckMapper.updateFlowFormFireFirecheck(flowFormFireFirecheck);
    }

    /**
     * 批量删除消防队消防检查
     *
     * @param id 需要删除的消防队消防检查主键
     * @return 结果
     */
    @Override
    public int deleteFlowFormFireFirecheckByIds(Long id)
    {
        return flowFormFireFirecheckMapper.deleteFlowFormFireFirecheckByIds(id);
    }

    /**
     * 删除消防队消防检查信息
     *
     * @param id 消防队消防检查主键
     * @return 结果
     */
    @Override
    public int deleteFlowFormFireFirecheckById(Long id)
    {
        return flowFormFireFirecheckMapper.deleteFlowFormFireFirecheckById(id);
    }
}
